// ComboxItem.cpp: implementation of the CComboxItem class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ComboxItem.h"
#include "omboxExpandBase.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CComboxItem::CComboxItem()
{

}

CComboxItem::~CComboxItem()
{

}
void CComboxItem::OnBtnDown(CPoint pT)
{
	ComboxExpandBase *pCombox=new ComboxExpandBase;
	CRect comboxRc=GetItemVisibleRect();
	comboxRc.DeflateRect(1,1);
	if (comboxRc.IsRectEmpty())
	{
		return ;
	}
	comboxRc.bottom=comboxRc.bottom+400;
	if (!pCombox->Create (WS_CHILD  | CBS_NOINTEGRALHEIGHT| CBS_DROPDOWNLIST | WS_VSCROLL | CBS_HASSTRINGS,
		comboxRc, GetGridDarw(), 0x11))
	{
		delete pCombox;
	}
	pCombox->SetFont(GetGridDarw()->GetFont());
	pCombox->SetItemHeight(-1,GetItemVisibleRect().Height()-3);
	pCombox->AddString("12345");
	pCombox->AddString("12345678");
	pCombox->SetIconListItem(this);
	pCombox->ShowWindow(TRUE);
	pCombox->SetFocus();
}
void CComboxItem::OnBtnUp(CPoint pT)
{

}
void CComboxItem::OnDarwItem(HDC hDC,const CRect DarwRc)
{
	CGridBaseItem::OnDarwItem(hDC,DarwRc);
}